package com.seculab.admin.web;

import javax.servlet.http.HttpSession;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class LogoutController {
	
	private final static Logger logger = Logger.getLogger(LogoutController.class);
	
	@RequestMapping("/logout")
	public String logout(HttpSession session) {
		logger.debug("LogoutController is started");
		
		session.invalidate();
		
		return "redirect:login";
	}
	
}
